package com.platform.modules.act.common.service.impl;

import java.util.Arrays;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.platform.modules.act.common.service.AssignService;
import com.platform.modules.sys.service.SysOrgUserService;
import com.platform.modules.sys.service.SysUserService;

/**
 * assign
 * @author ganyimeng
 *
 */
@Service
public class AssignServiceImpl implements AssignService {

	@Autowired
    SysUserService sysUserService;
	@Autowired
	SysOrgUserService sysOrgUserService;
	
	
	
	/**
	 * 获取机构管理员
	 */
	@Override
	public List<String> assignByOrg(String orgNo) {
		return Arrays.asList(sysUserService.getAdminUserIdByOrg(orgNo));
	}
	
	/**
	 * 获取特定机构下拥有特定流程权限的人
	 */
	@Override
	public List<String> assignByOrgAndPermis(String orgNo, String... permis) {
		return sysOrgUserService.selectProcessUser(orgNo,permis);
	}
	
	
}
